<template>
	<view class="breadcrumb">
		<view class="path" v-for="(p,i) in path" :key="i">
			<navigator :open-type="p.openType" :url="p.href">{{p.name}}</navigator>
			<text class="separator" v-if="i<path.length-1">{{separator}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			separator:{
				type:String,
				default: "/",
				required:false
			},
			path :{
				type:Array,
				required:true
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
	.breadcrumb {
		display: flex;
		.path {
			display: flex;
			.separator {
				margin: 0 $uni-spacing-row-sm;
			}
		}
	}

</style>